package com.example.musictest.ui.adapter;

import android.content.Context;

import com.example.musictest.R;
import com.fw.mediasession.media.bean.Music;
import com.zy.base.recycleview.BaseRecycleAdapter;
import com.zy.base.recycleview.BaseViewHolder;
import com.zy.untils.GlideUtils;

import java.util.List;

public class MusicAdapter extends BaseRecycleAdapter<Music> {
    public MusicAdapter(Context mContext, List<Music> mDatas, int mLayoutId) {
        super(mContext, mDatas, mLayoutId);
    }

    @Override
    protected void convert(Context mContext, BaseViewHolder holder, Music music) {
        holder.setText(R.id.music_title,music.album);
        holder.setText(R.id.music_detail,music.artist+":"+music.displayName);
        GlideUtils.setImageView(holder.getView(R.id.music_image),music.filePath);
    }
}
